<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <meta http-equiv="X-UA-Compatible" content="ie=edge">
  <title>登录</title>
  <link rel="stylesheet" href="public/semantic.min.css" media="screen" title="no title" charset="utf-8">
  <link rel="stylesheet" href="public/index.css" media="screen" title="no title" charset="utf-8">
</head>
<body>
  <div class="ui  container two column grid">
    <div class="column login" >
      <h4 class="ui top attached block header">
         网上书店
      </h4>
      <form class="ui form bottom attached segment ">
        <div class="ui two column middle aligned very relaxed stackable grid">
          <div class="column">
            <div class="ui form">
              <div class="field">
                <label>手机号</label>
                <div class="ui left icon input">
                  <input name="tel" type="text" >
                  <i class="user icon"></i>
                </div>
              </div>
              <div class="field">
                <label>密码</label>
                <div class="ui left icon input">
                  <input name="password" type="password">
                  <i class="lock icon"></i>
                </div>
              </div>
              <div class="ui blue submit button login">登录</div>
            </div>
          </div>
          <div class="ui vertical divider">Or </div>
          <div class="center aligned column">
            <a href="register.html" class="ui big green labeled icon button"><i class="signup icon"></i> 注册</a>
          </div>
        </div>
      </form>
    </div>

  </div>

  <script src="public/jquery-2.2.0.js" charset="utf-8"></script>
  <script src="public/index.js" charset="utf-8"></script>
  <script src="public/semantic.min.js" charset="utf-8"></script>
  <script type="text/javascript">
    $('.button.login').click(function(){
      var data=getFormData('form');
      $.post('action.php?c=login&m=index',{data:data},function(data){
       if(data=='true')window.location.href="index.php";
      })
    })
  </script>
</body>
</html>
